<template>
  <div class="w-[280px] bg-white flex flex-col justify-center">
    <BaseBarcode v-if="patientInfo.bARCODE" :value="patientInfo.bARCODE" class="mt-2" />
    <div class="mt-10 ml-[15px]">{{ patientInfo.brname }}</div>
  </div>
</template>

<script setup>
// import { getSystemConfig } from '@/utils/systemConfig'
const props = defineProps({
  printData: {
    type: Object,
    default: () => ({})
  }
})
const patientInfo = ref({})
watch(
  () => props.printData,
  (val) => {
    if (val?.printData?.detail) {
      patientInfo.value = val?.printData?.detail[0]
    }
  },
  { immediate: true, deep: true }
)
</script>
<style lang="less" scoped>
@media print {
  @page {
    size: 21cm 29.7cm;
  }
}
</style>
